/*
 * @Description: math
 * @Author: rendc
 * @Date: 2022-10-10 09:14:25
 * @LastEditors: rendc
 * @LastEditTime: 2022-10-10 09:29:34
 */
console.log(Math.min(1, 5, 6));
console.log(Math.max(1, 5, 6));

// 向上舍入
console.log(Math.ceil(100.9));  // 101
console.log(Math.ceil(100.4));  // 101
// 向下舍入
console.log(Math.floor(100.9)); // 100
console.log(Math.floor(100.4)); // 100
// 四舍五入
console.log(Math.round(100.9)); // 101
console.log(Math.round(100.4)); // 100

console.log(Math.random());  // [0, 1)
// 获取0-100的随机数
console.log(Math.floor(Math.random() * 100));  // [0, 100)
console.log(parseInt(Math.random() * 100));  // [0, 100)

console.log(Math.PI);

// https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Math
